package org.mango.bean;

import org.mango.validator.B3Validator;
import org.mango.validator.anno.Refer;
import org.mango.validator.group.G1;
import org.mango.validator.refer.AOneBNotNullValidator;

/**
 * Created by meigang on 17/9/15.
 */
public class B {
    private String b1;

    @Refer(validator = AOneBNotNullValidator.class,
            groups = {G1.class},
            param = {"org.mango.bean.C:a0=1"},
            message = "b2的值在a0=1，才不能为空")
    private String b2;

    @Refer(validator = B3Validator.class,
            param = {"org.mango.bean.B:b1=1"},
            message = "b3的值在b1=mango，才不能为空")
    private String b3;

    public String getB1() {
        return b1;
    }

    public void setB1(String b1) {
        this.b1 = b1;
    }

    public String getB2() {
        return b2;
    }

    public void setB2(String b2) {
        this.b2 = b2;
    }

    public String getB3() {
        return b3;
    }

    public void setB3(String b3) {
        this.b3 = b3;
    }
}
